#include <asio.hpp>
#include <sigc++/sigc++.h>
#include <thread>
#include <string>
#include <iostream>
#include <chrono>

int main()
{
    sigc::signal<void(const std::string& s)> signal_print;
    signal_print.connect([](const std::string& s) {
        std::cout << "s is " << s << std::endl;
    });


    asio::io_service io;

    std::thread t([&]() {
        std::this_thread::sleep_for(std::chrono::seconds(3));
        signal_print.emit("3s hash esplaed");
        io.stop();
    });

    io.run();
    std::cout << "haha" << std::endl;
    t.join();
    return  0;
}